// 将传入的对象所有属性变成可选类型
type MyPartial<T> = { [K in keyof T]?: T[K] };

type MyRecord<K extends keyof any, T> = {
  [Key in K]: T;
};

type MyReadonly<T> = { readonly [K in keyof T]?: T[K] };

type MyRequired<T> = { [K in keyof T]-?: T[K] };

type MyPick<T, K extends keyof T> = {
  [Key in K]: T[Key];
};

type MyExclude<T, U> = T extends U ? never : T;

type MyOmit<T, K> = Pick<T, MyExclude<keyof T, K>>;

type MyReturnType<T> = T extends () => infer P ? P : T;

export const a = 0;
